$OpenBSD: patch-tools_Makefile_in,v 1.1 2011/10/16 07:03:12 ajacoutot Exp $
--- tools/Makefile.in.orig	Wed Sep 13 16:01:11 2000
+++ tools/Makefile.in	Sun Oct 16 02:26:52 2011
@@ -159,19 +159,19 @@ varprefix = @varprefix@
 
 AUTOMAKE_OPTIONS = 1.4 foreign
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/build 	-I$(top_srcdir)/lib -I$(top_srcdir)/popt 	@INCPATH@ -I$(top_srcdir)/misc
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/build 	-I$(top_srcdir)/lib	@INCPATH@ -I$(top_srcdir)/misc
 
 
 EXTRA_DIST = fstrcmp.c message.c str-list.c rpmchecksig.c
 
 EXTRA_PROGRAMS = rpmgettext rpmputtext rpminject
 
-myldflags = -L$(top_builddir)/build -L$(top_builddir)/lib -L$(top_builddir)/popt
+myldflags = -L$(top_builddir)/build -L$(top_builddir)/lib
 # XXX should libtool generate dependent libs?
-myldadd = $(top_builddir)/build/librpmbuild.la 	$(top_builddir)/lib/librpm.la 	$(top_builddir)/popt/libpopt.la 	@INTLLIBS@ @LIBMISC@
+myldadd = $(top_builddir)/build/librpmbuild.la 	$(top_builddir)/lib/librpm.la 	-lpopt	-lintl -liconv @LIBMISC@
 
 
-LDFLAGS = $(myldflags)
+LDFLAGS = @LDFLAGS@ $(myldflags)
 LDADD = $(myldadd)
 
 noinst_PROGRAMS =  	dump dumpdb javadeps rpmarchive rpmheader rpmlead rpmsignature
@@ -194,60 +194,60 @@ CPPFLAGS = @CPPFLAGS@
 rpmgettext_OBJECTS =  rpmgettext.o
 rpmgettext_LDADD = $(LDADD)
 rpmgettext_DEPENDENCIES =  $(top_builddir)/build/librpmbuild.la \
-$(top_builddir)/lib/librpm.la $(top_builddir)/popt/libpopt.la
+$(top_builddir)/lib/librpm.la
 rpmgettext_LDFLAGS = 
 rpmputtext_OBJECTS =  rpmgettext.o
 rpmputtext_LDADD = $(LDADD)
 rpmputtext_DEPENDENCIES =  $(top_builddir)/build/librpmbuild.la \
-$(top_builddir)/lib/librpm.la $(top_builddir)/popt/libpopt.la
+$(top_builddir)/lib/librpm.la
 rpmputtext_LDFLAGS = 
 rpminject_SOURCES = rpminject.c
 rpminject_OBJECTS =  rpminject.o
 rpminject_LDADD = $(LDADD)
 rpminject_DEPENDENCIES =  $(top_builddir)/build/librpmbuild.la \
-$(top_builddir)/lib/librpm.la $(top_builddir)/popt/libpopt.la
+$(top_builddir)/lib/librpm.la
 rpminject_LDFLAGS = 
 dump_SOURCES = dump.c
 dump_OBJECTS =  dump.o
 dump_LDADD = $(LDADD)
 dump_DEPENDENCIES =  $(top_builddir)/build/librpmbuild.la \
-$(top_builddir)/lib/librpm.la $(top_builddir)/popt/libpopt.la
+$(top_builddir)/lib/librpm.la
 dump_LDFLAGS = 
 dumpdb_SOURCES = dumpdb.c
 dumpdb_OBJECTS =  dumpdb.o
 dumpdb_LDADD = $(LDADD)
 dumpdb_DEPENDENCIES =  $(top_builddir)/build/librpmbuild.la \
-$(top_builddir)/lib/librpm.la $(top_builddir)/popt/libpopt.la
+$(top_builddir)/lib/librpm.la
 dumpdb_LDFLAGS = 
 javadeps_SOURCES = javadeps.c
 javadeps_OBJECTS =  javadeps.o
 javadeps_LDADD = $(LDADD)
 javadeps_DEPENDENCIES =  $(top_builddir)/build/librpmbuild.la \
-$(top_builddir)/lib/librpm.la $(top_builddir)/popt/libpopt.la
+$(top_builddir)/lib/librpm.la
 javadeps_LDFLAGS = 
 rpmarchive_SOURCES = rpmarchive.c
 rpmarchive_OBJECTS =  rpmarchive.o
 rpmarchive_LDADD = $(LDADD)
 rpmarchive_DEPENDENCIES =  $(top_builddir)/build/librpmbuild.la \
-$(top_builddir)/lib/librpm.la $(top_builddir)/popt/libpopt.la
+$(top_builddir)/lib/librpm.la
 rpmarchive_LDFLAGS = 
 rpmheader_SOURCES = rpmheader.c
 rpmheader_OBJECTS =  rpmheader.o
 rpmheader_LDADD = $(LDADD)
 rpmheader_DEPENDENCIES =  $(top_builddir)/build/librpmbuild.la \
-$(top_builddir)/lib/librpm.la $(top_builddir)/popt/libpopt.la
+$(top_builddir)/lib/librpm.la
 rpmheader_LDFLAGS = 
 rpmlead_SOURCES = rpmlead.c
 rpmlead_OBJECTS =  rpmlead.o
 rpmlead_LDADD = $(LDADD)
 rpmlead_DEPENDENCIES =  $(top_builddir)/build/librpmbuild.la \
-$(top_builddir)/lib/librpm.la $(top_builddir)/popt/libpopt.la
+$(top_builddir)/lib/librpm.la
 rpmlead_LDFLAGS = 
 rpmsignature_SOURCES = rpmsignature.c
 rpmsignature_OBJECTS =  rpmsignature.o
 rpmsignature_LDADD = $(LDADD)
 rpmsignature_DEPENDENCIES =  $(top_builddir)/build/librpmbuild.la \
-$(top_builddir)/lib/librpm.la $(top_builddir)/popt/libpopt.la
+$(top_builddir)/lib/librpm.la
 rpmsignature_LDFLAGS = 
 CFLAGS = @CFLAGS@
 COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
